
<%@page import="java.util.List"%>
<%@ include file="/common/taglibs.jsp"%>
<script type="text/javascript">
  $(document).ready(function() {
	$('.dl').click(function() {
		loadDiv('content', $(this).attr('url'));
	});
	$('#pageTitle').text('<spring:message code="dashboard.tabs.crms.home" />');
  });
</script>
	<font id="mark"></font>
	<div class="main_form">
		<div class="form_head">
			<h4>Actionable Alerts</h4>
			<form:form name="filterAlert" id="filterAlert"
				action="actionalertFilterDashboard.do" method="post"
				modelAttribute="userPreference">
				<table align="right">
					<tr>
					<td align="left"><form:select path="aaAsignId" onchange="filterActionalert()">
								<form:option value="" label="Assigned to All" />
									<form:option value="${user.id}" label="Assigned to me" />
					</form:select></td>
					<td>&nbsp;&nbsp;&nbsp;</td>
					<td><form:select path="aaReagionId" cssStyle="width: 120px;"
									onchange="filterActionalert()">
									<form:option value="" label="All Regions" />
									<form:options items="${regionList}" itemValue="id"
										itemLabel="displayName" />
						</form:select>
								</td>
						<td valign="top"><h4>Filter By Date</h4>
						</td>
						<td><form:select path="aaDateid" onchange="filterActionalert()">
								<form:option value="1" label="All" />
								<form:option value="2" label="Today" />
								<form:option value="3" label="Last 7days" />
								<form:option value="4" label="Last Month" />
							</form:select>
						</td>
						<td valign="top"><h4>Filter By Type</h4>
						</td>
						<td>
                          <form:select path="aaid" onchange="filterActionalert()">
                          <c:if test="${not empty allowedUiElements['Actionable Alerts']}">
							<form:option value="" label="All" />
                            <c:forEach items="${actionableAlerts}" var="actionableAlert">
                              <c:if test="${not empty allowedUiElements['Actionable Alerts'][actionableAlert.type]}">
                                <form:option value="${actionableAlert.id}" label="${actionableAlert.type}" />
                              </c:if>
                            </c:forEach>
                          </c:if>
						  </form:select>
                        </td>
					<td>
					<a href="javascript://" onclick="loadDiv('content', 'actionalertMessage.do')"">List Of Actionable Alert Types</a>
					</td>
					</tr>

				</table>
			</form:form>
			<br class="clear">
		</div>
		<div class="form_cont" id="actionalertContent">
			<jsp:include page="actionableAlret.jsp"></jsp:include>
		</div>
		<!-- closed scroll div -->
	</div>
	<div class="main_form">
		<div class="form_head">
			<h4>Dashboard</h4>
			<br class="clear">
		</div>
		<div class="form_cont">
			<form:form name="projectfilter" id="projectfilter"
						action="actionalertFilterDashboard.do" method="post"
						modelAttribute="userPreference">
			<table class="narrow-tables" border="0" cellpadding="0"
				cellspacing="0">
				<tbody>
						<tr>
							<td class="grid-header">PROJECTS AND GRANTS</td>
							<td class="grid-header"><form:select path="projectReagionId" cssStyle="width: 120px;"
									onchange="filterproject()">
									<form:option value="" label="All Regions" />
									<form:options items="${regionList}" itemValue="id"
										itemLabel="displayName" />
								</form:select>
							</td>
							<td class="grid-header"><form:select path="projectAsignId"
									onchange="filterproject()">
									<form:option value="" label="Assigned to All" />
									<form:option value="${user.id}" label="Assigned to me" />
								</form:select>
							</td>
							<td class="grid-header">&nbsp;</td>
						</tr>

						<tbody id="p1"><jsp:include page="dashboardProject.jsp"></jsp:include></tbody>
						<tr>
							<td class="grid-header" colspan="2">PAYMENT PROCESSING</td>

							<td class="grid-header"><form:select path="paymentAssingId"
									onchange="filterpayment()">
									<form:option value="" label="Assigned to All" />
									<form:option value="${user.id}" label="Assigned to Me" />
								</form:select>
							<td class="grid-header">&nbsp;</td>
						</tr>
						<tbody id="p2"><jsp:include page="dashboardPayment.jsp"></jsp:include></tbody>
					
				</tbody>
			</table>
			</form:form>
			<form:form name="partnerfilter" id="partnerfilter"
						action="actionalertFilterDashboard.do" method="post"
						modelAttribute="userPreference">
			<table class="narrow-tables" border="0" cellpadding="0"
				cellspacing="0">
				<tbody>
					

						<tr>
							<td class="grid-header">
								<!--<p>&nbsp;</p>--> PARTNER MONITORING <!--<p></p>--></td>
							<td class="grid-header"><form:select path="partnerReagionId"
									onchange="filterpartner()">
									<form:option value="" label="All Regions" />
									<form:options items="${regionList}" itemValue="id"
										itemLabel="displayName" />
								</form:select>
							</td>
							<td class="grid-header"><form:select path="partnerAsignId"
									onchange="filterpartner()">
									<form:option value="" label="Assigned to All" />
									<form:option value="${user.id}" label="Assigned to me" />
								</form:select>
							</td>
							<td class="grid-header">&nbsp;</td>
						</tr>

					<tbody id="p3">
						<jsp:include page="dashboardPartner.jsp"></jsp:include>
					</tbody>
				</tbody>
			</table>
			</form:form>

			<table class="narrow-tables" border="0" cellpadding="0"
				cellspacing="0">
				<tbody>
					<tr>
						<td class="grid-header">
							<!--<p>&nbsp;</p>--> DONOR AND DONOR AWARDS <!--<p></p>-->
						</td>
						<td class="grid-header">&nbsp;</td>
					</tr>
				<c:forEach items="${donorLinks}" var="dashBoardLink"
						varStatus="status">
                    <c:if test="${isFinanceUser || isGrantUser || isStaffUser || isKmUser || isSrManagementUser || isAdminUser}">
						<tr>
							<td><a href="javascript://" url="${dashBoardLink.url}"
								class="dl">${dashBoardLink.linkName}</a>
							</td>
							<td>${dashBoardLink.count}</td>
						</tr>
                    </c:if>            
					</c:forEach>
				</tbody>
			</table>
			<br class="clear" />
		</div>
	</div>
	<div class="main_form">
		<div class="form_head">
			<h4>Change Notifications</h4>
			<form:form name="filterCNFrom" id="filterCNFrom"
				action="findResultCipeproject.do" method="post"
				modelAttribute="userPreference">
				<table align="right">
					<tr>
						<td><form:select path="cnAsignId" onchange="filterCN()">
								<form:option value="" label="Assigned to All" />
									<form:option value="${user.id}" label="Assigned to me" />
					</form:select></td>
					<td>&nbsp;&nbsp;&nbsp;</td>
					<td><form:select path="cnReagionId" cssStyle="width: 120px;"
									onchange="filterCN()">
									<form:option value="" label="All Regions" />
									<form:options items="${regionList}" itemValue="id"
										itemLabel="displayName" />
						</form:select>
						</td>
						<td valign="top"><h4>Filter By Date</h4>
						</td>
						<td><form:select path="cnDateid" onchange="filterCN()">
								<form:option value="1" label="All" />
								<form:option value="2" label="Today" />
								<form:option value="3" label="Last 7days" />
								<form:option value="4" label="Last Month" />
							</form:select>
						</td>
						<td valign="top"><h4>Filter By Type</h4>
						</td>
						<td>
                          <form:select path="cnid" onchange="filterCN()">
                          <c:if test="${not empty allowedUiElements['Change Notifications']}">
							<form:option value="" label="All" />
                            <c:forEach items="${changenotifications}" var="changenotification">
                              <c:if test="${not empty allowedUiElements['Change Notifications'][changenotification.type]}">
                                <form:option value="${changenotification.id}" label="${changenotification.type}" />
                              </c:if>
                            </c:forEach>
                          </c:if>
						  </form:select>
                        </td>
					    <td>
					       <a href="javascript://" onclick="loadDiv('content', 'changeNotificationMessage.do')"">List Of Change Notification Types</a>
                        </td>
					</tr>
				</table>
			</form:form>
			<br class="clear">
		</div>
		<div class="form_cont">
			<table cellspacing="0" cellpadding="0" border="0" class="tablesorter">
				<tbody>
					<tr>
						<td align="left" class="grid-header" width="110px">Module</td>
						<td align="left" class="grid-header" width="160px">Type</td>
						<td align="left" class="grid-header" width="100px">Date</td>
						<td align="center" class="grid-header">Message</td>
						<td align="right" class="grid-header">Remove from YOUR list
							of Notifications</td>
					</tr>
				</tbody>
			</table>

			<div class="hastable" id="cnContent">
				<jsp:include page="dashboardCN.jsp" />
			</div>
		</div>
	</div>
</div>